package com.carl.mall.third.controller;


import com.carl.common.utils.R;
import com.carl.mall.third.utils.Sample_reg;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Log4j2
public class SmsShortEmail {


    @Autowired
    private Sample_reg sample;

    @GetMapping("/sms/sendCode")
    public R sendCode(@RequestParam("phone") String phone,@RequestParam("code")String code){
        sample.sendSms(phone, code);
        System.out.println("调用成功" + code + phone);
        return R.ok();
    }
}
